package binary_tree.leetcode.easy;

/**
 * @author bruin_du
 * @description 二叉树的深度
 * @date 2022/5/31 16:51
 **/
public class Offer55I_MaxDepth {
    public int maxDepth(TreeNode root) {
        if(root == null) return 0;
        return Math.max(maxDepth(root.left),maxDepth(root.right)) + 1;
    }
}
